﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="OrcasTest.aspx.cs" Inherits="_35newpart_OrcasTest" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>OrcasTestPage</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

               <asp:GridView ID="GridView1" runat="server">
        </asp:GridView>
       

        <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
            ContextTypeName="Linq查询DataContext" OrderBy="adddate desc" 
            Select="new (mch, bookid, xx, bookchuban, bookname)" TableName="books">
        </asp:LinqDataSource>


       

        <asp:ListView ID="ListView1" runat="server" DataSourceID="LinqDataSource1">
            <AlternatingItemTemplate>
                <li style="background-color: #FFFFFF;color: #284775;">mch:
                    <asp:Label ID="mchLabel" runat="server" Text='<%# Eval("mch") %>' />
                    <br />
                    bookid:
                    <asp:Label ID="bookidLabel" runat="server" Text='<%# Eval("bookid") %>' />
                    <br />
                    xx:
                    <asp:Label ID="xxLabel" runat="server" Text='<%# Eval("xx") %>' />
                    <br />
                    bookchuban:
                    <asp:Label ID="bookchubanLabel" runat="server" 
                        Text='<%# Eval("bookchuban") %>' />
                    <br />
                    bookname:
                    <asp:Label ID="booknameLabel" runat="server" Text='<%# Eval("bookname") %>' />
                    <br />
                </li>
            </AlternatingItemTemplate>
            <LayoutTemplate>
                <ul id="itemContainer" runat="server" 
                    style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                </ul>
                <div 
                    
                    style="font-family: Verdana, Arial, Helvetica, sans-serif;text-align: center;background-color: #5D7B9D;color: #FFFFFF;">
                </div>
            </LayoutTemplate>
            <ItemTemplate>
                <li style="background-color: #E0FFFF;color: #333333;">mch:
                    <asp:Label ID="mchLabel" runat="server" Text='<%# Eval("mch") %>' />
                    <br />
                    bookid:
                    <asp:Label ID="bookidLabel" runat="server" Text='<%# Eval("bookid") %>' />
                    <br />
                    xx:
                    <asp:Label ID="xxLabel" runat="server" Text='<%# Eval("xx") %>' />
                    <br />
                    bookchuban:
                    <asp:Label ID="bookchubanLabel" runat="server" 
                        Text='<%# Eval("bookchuban") %>' />
                    <br />
                    bookname:
                    <asp:Label ID="booknameLabel" runat="server" Text='<%# Eval("bookname") %>' />
                    <br />
                </li>
            </ItemTemplate>
            <insertitemtemplate>
                <li style="">mch:
                    <asp:TextBox ID="mchTextBox" runat="server" Text='<%# Bind("mch") %>' />
                    <br />
                    bookid:
                    <asp:TextBox ID="bookidTextBox" runat="server" Text='<%# Bind("bookid") %>' />
                    <br />
                    xx:
                    <asp:TextBox ID="xxTextBox" runat="server" Text='<%# Bind("xx") %>' />
                    <br />
                    bookchuban:
                    <asp:TextBox ID="bookchubanTextBox" runat="server" 
                        Text='<%# Bind("bookchuban") %>' />
                    <br />
                    bookname:
                    <asp:TextBox ID="booknameTextBox" runat="server" 
                        Text='<%# Bind("bookname") %>' />
                    <br />
                    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                        Text="Insert" />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                        Text="Clear" />
                </li>
            </insertitemtemplate>
            <selecteditemtemplate>
                <li style="background-color: #E2DED6;font-weight: bold;color: #333333;">mch:
                    <asp:Label ID="mchLabel" runat="server" Text='<%# Eval("mch") %>' />
                    <br />
                    bookid:
                    <asp:Label ID="bookidLabel" runat="server" Text='<%# Eval("bookid") %>' />
                    <br />
                    xx:
                    <asp:Label ID="xxLabel" runat="server" Text='<%# Eval("xx") %>' />
                    <br />
                    bookchuban:
                    <asp:Label ID="bookchubanLabel" runat="server" 
                        Text='<%# Eval("bookchuban") %>' />
                    <br />
                    bookname:
                    <asp:Label ID="booknameLabel" runat="server" Text='<%# Eval("bookname") %>' />
                    <br />
                </li>
            </selecteditemtemplate>
            <emptydatatemplate>
                No data was returned.
            </emptydatatemplate>
            <edititemtemplate>
                <li style="background-color: #999999;">mch:
                    <asp:TextBox ID="mchTextBox" runat="server" Text='<%# Bind("mch") %>' />
                    <br />
                    bookid:
                    <asp:TextBox ID="bookidTextBox" runat="server" Text='<%# Bind("bookid") %>' />
                    <br />
                    xx:
                    <asp:TextBox ID="xxTextBox" runat="server" Text='<%# Bind("xx") %>' />
                    <br />
                    bookchuban:
                    <asp:TextBox ID="bookchubanTextBox" runat="server" 
                        Text='<%# Bind("bookchuban") %>' />
                    <br />
                    bookname:
                    <asp:TextBox ID="booknameTextBox" runat="server" 
                        Text='<%# Bind("bookname") %>' />
                    <br />
                    <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                        Text="Update" />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                        Text="Cancel" />
                </li>
            </edititemtemplate>
            <itemseparatortemplate>
                <br />
            </itemseparatortemplate>
        </asp:ListView>




    </div>
    </form>
</body>
</html>
